home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.9 KB | 116 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWBTxtSh.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- //
- // Class Definitions for
- // - FW_CBaseTextShape
- //
-
- #ifndef FWBTXTSH_H
- #define FWBTXTSH_H
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- // ----- Macintosh Includes -----
-
- #if defined(FW_BUILD_MAC) && !defined(__TEXTEDIT__)
- #include <TextEdit.h>
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CGraphicContext;
- class FW_CTextReader;
- class FW_CPrivTextBuffer;
-
- //========================================================================================
- // class FW_CBaseTextShape
- //========================================================================================
-
- class FW_CBaseTextShape : public FW_CShape
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CBaseTextShape)
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CBaseTextShape();
- FW_CBaseTextShape(const FW_CString& string,
- const FW_CInk& ink,
- const FW_CFont& font);
-
- FW_CBaseTextShape(FW_CTextReader& textReader,
- const FW_CInk& ink,
- const FW_CFont& font);
-
- FW_CBaseTextShape(FW_CReadableStream& stream);
- FW_CBaseTextShape(const FW_CBaseTextShape& other);
-
- virtual ~ FW_CBaseTextShape();
-
- //----------------------------------------------------------------------------------------
- // Operators
- //
- public:
- FW_CBaseTextShape& operator=(const FW_CBaseTextShape& other);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Hit Testing -----
- virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
- const FW_CPoint& test,
- FW_Fixed tolerance) const;
-
- // ----- Flatten -----
- virtual void Flatten(FW_CWritableStream& stream) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Geometry -----
- void GetString(FW_CString& string) const
- {string = fString;}
- void SetString(const FW_CString& string);
-
- void GetText(FW_CTextWriter& textWriter) const;
- void SetText(FW_CTextReader& textReader);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- FW_CString fString;
- };
-
- inline void FW_CBaseTextShape::SetString(const FW_CString& string)
- {
- // MetroWerks bug workaroung [AMB]
- FW_CString& thisString = fString;
- thisString = string;
- }
-
- #endif
-